package org.osomit.sacct.builder;

import org.osomit.sacct.entity.SecureRequest;

import java.util.Map;

/**
 * @author Jian Fang (John.Jian.Fang@gmail.com)
 *
 * Date: Jul 2, 2009
 */
public class SecureRequestBuilder extends BaseBuilder<SecureRequest>{

    public SecureRequest build(Object object) {

        if (object != null) {
            SecureRequest request = new SecureRequest();
            Map map = (Map) object;
            request.setSessionId((String) map.get(SecureRequest.SESSION_ID));
            request.setRequest((String) map.get(SecureRequest.REQUEST));

            return request;
        }

        return null;
    }
}
